<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link rel="stylesheet" type="text/css" href="/css/plugins/layui/layui.css"/>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
	<div class="row">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<!-- <div class="columns pull-left">
							<button shiro:hasPermission="centre:cashLog:batchGrant"  type="button" class="btn  btn-danger"
								onclick="batchGrant()"><i class="fa fa-check" aria-hidden="true"></i>批量打款
							</button>
							<button shiro:hasPermission="centre:cashLog:callback"  type="button" class="btn  btn-danger"
								onclick="callback()"><i class="fa fa-check" aria-hidden="true"></i>批量回调
							</button>
						</div> -->
						<div class="columns pull-right" role="group">
							<button class="btn btn-success" onclick="reLoad()">
								<i class="fa fa-search" aria-hidden="true"></i>查询
							</button>
						</div>
						<div class="columns pull-right col-md-2 nopadding">
							<input type="text" class=" form-control"
								   id="end" name="end" placeholder="请选择结束日期"
								   style="background-color: #fff;" readonly="readonly"/>
						</div>

						<div class="columns pull-right">
							<label style="font-weight: 700;float: left;padding: 3px 10px;line-height: 2;font-size: 15px">
								<i class="fa fa-exchange"></i>
							</label>
						</div>
						<div class="columns pull-right col-md-2 nopadding">
							<input type="text" class=" form-control"
								   id="start" name="start" placeholder="请选择开始日期"
								   style="background-color: #fff;" readonly="readonly"/>
						</div>

						<input type="hidden" name="centreId" th:value="${centreId}" th:if="${flag} == '1'">
						<div class="columns pull-right col-md-1 nopadding" th:if="${flag} == '0'">
							<select data-placeholder="商户" class="form-control chosen-select" name="centreId" tabindex="2">
								<option value="" selected="selected">选择商户</option>
								<option th:each="item: ${centreList}" th:text="${item.name}" th:value="${item.centreId}"></option>
							</select>
						</div>

						<div class="columns pull-right col-md-1 nopadding">
							<select id="status" data-placeholder="选择状态" class="form-control chosen-select" tabindex="2">
								<option value="">所有状态</option>
								<option value="-1">作废</option>
								<option value="0" selected>申请中</option>
								<option value="1">已打款</option>
							</select>
						</div>
					</div>
					<!-- <table id="centreCashLogsTable" data-mobile-responsive="true"></table> -->
				</div>
			</div>
		</div>
		
		<div class="col-lg-12 col-md-12 col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<div class="gg-nav">
							<ul class="nav nav-tabs">
								
								<li class="active" value="2">
									<a href="#waitPay" onclick="load()" data-toggle="tab">待打款</a>
								</li>
								<li value="5">
									<a href="#bankProcess" onclick="loadbankProcess()" data-toggle="tab">打款中</a>
								</li>
							</ul>
						</div>
					</div>
					<div class="tab-content">

						<!--waitPay 待打款-->
						<div class="ibox-content tab-pane fade in active"  id="waitPay">
							<div class="fixed-table-toolbar">
								<div class="columns pull-left">
								<!-- 	<button id="payBtn"  shiro:hasPermission="centre:cashLog:batchGrant"  type="button" class="btn  btn-danger"
								    onclick="batchGrant()"><i class="fa fa-check" aria-hidden="true"></i>批量打款
							   </button> -->
								</div>
							</div>
							<table id="centreCashLogsTable" data-mobile-responsive="true"></table>
						</div>

						
						<!--disabled 打款中-->
						<div class="ibox-content tab-pane fade in"  id="bankProcess">
							<div class="fixed-table-toolbar">
								<div class="columns pull-left">
								<button shiro:hasPermission="centre:cashLog:callback"  type="button" class="btn  btn-danger"
								onclick="callback()"><i class="fa fa-check" aria-hidden="true"></i>批量回调
							</button>
									
								</div>
							</div>
						
							<table id="bankProcessTable" data-mobile-responsive="true"></table>
						</div>
						
					</div>
				</div>
			</div>
		
		</div>
</div>

		<div>
			<script type="text/javascript">
				var s_cancel_h = 'hidden';
				var s_grant_h = 'hidden';
				var s_callback_h= 'hidden';
			</script>
		</div>
		<div shiro:hasPermission="centre:cashLog:cancel">
			<script type="text/javascript">
                s_cancel_h = '';
			</script>
		</div>
		<div shiro:hasPermission="centre:cashLog:grant">
			<script type="text/javascript">
                s_grant_h = '';
			</script>
		</div>
		<div shiro:hasPermission="centre:cashLog:callback">
			<script type="text/javascript">
			    s_callback_h = '';
			</script>
		</div>
	
	<div th:include="include :: footer"></div>
		<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
	<script type="text/javascript" src="/js/plugins/layui/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/centre/cashLog/logs.js"></script>
</body>
</html>